Skip to content

test: mass-sensitivity asserts for jax_likelihood median literals - #254

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/jax-likelihood-mass-sensitivity
Aug 6, 2026
Merged

test: mass-sensitivity asserts for jax_likelihood median literals#254
Jammy2211 merged 1 commit into
mainfrom
feature/jax-likelihood-mass-sensitivity

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Audit follow-up to #251/#252 (fixes #253). An audit of every jax_likelihood/datacube script found that 10 vmap literals could not detect a source-plane mass regression: perturbing all lens mass parameters by +5% moved the likelihood by less than the literal's rtol=1e-4 tolerance (9 scripts), or not at all (imaging/jax_likelihood/mge_group.py, ΔLL ≈ 5e-11 — its median configuration zeroes the source's solved intensities).

Human-approved fix pattern — sensitivity asserts, no wholesale literal regeneration:

  • The 9 sub-tolerance scripts (7 interferometer/jax_likelihood/ + 2 interferometer/datacube/) gain a __Mass Sensitivity__ block after their literal: re-evaluate the fitness with every lens mass parameter perturbed +5% and assert |ΔLL| exceeds a per-script floor (audit-measured response ÷ 5, margin for platform drift). Existing literals untouched.
  • imaging/jax_likelihood/mge_group.py is hard-blind, so no assert can pass on its old model: its main Isothermal is now anchored near the simulator/simple.py truth (einstein_radius prior median 1.6, centre/ell fixed at truth) — this retains the source (ΔLL now 48.9) — its single literal is regenerated (−29060.215 → −28830.547), and it gets the same assert (floor 9.0).

Scripts Changed

All 10 audited-affected scripts; robustly-sensitive scripts untouched. Not covered (follow-up left on #253): the 8 multi_dataset/ scripts (audit harness cannot drive FactorGraphModel vmap — unclassified) and 5 non-standard-structure scripts (potential_correction ×2, shared_preloads ×2, delaunay_near_caustic).

Test Plan

  • All 10 patched scripts executed through their new literal + sensitivity assert in the worktree: 10/10 pass (PASS: mass-sensitivity floor exceeded.)
  • mge_group.py re-audited after anchoring: ΔLL 5e-11 → 48.9; new literal generated from the run and confirmed on re-execution
  • Floors are audit-measured ΔLL ÷ 5 — far above float noise, generous margin for cross-platform numeric drift

Heart gate: RED with the same single unrelated reason (release validation FAILED (stage integrate)) human-acknowledged for this day's earlier ships; ack covers that reason set only.

Generated by the PyAutoLabs agent workflow.

Audit (#253) found 9 vmap literals whose rtol tolerance exceeds the
likelihood response to a +5% lens-mass perturbation, and one
(imaging/mge_group) with zero response - the median configuration zeroes
the source's solved intensities. Each affected script gains a
__Mass Sensitivity__ block asserting the perturbed likelihood moves by
an audit-calibrated floor; imaging/mge_group additionally anchors its
Isothermal near simulator truth (retaining the source) and regenerates
its literal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Aug 6, 2026
@Jammy2211
Jammy2211 merged commit 27b66c3 into main Aug 6, 2026
@Jammy2211
Jammy2211 deleted the feature/jax-likelihood-mass-sensitivity branch August 6, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: mass-sensitivity asserts for jax_likelihood median literals

1 participant